<template>
	<scroll-view class="member-container" scroll-y>
		<view class="banner"></view>
		<view class="check-member flex flex--wrap justify-between">
			<view :class="{active:isSelect === index}" v-for="(item,index) in 6" :key="item" @click="isSelect = item">
				<view class="discount" v-if="isSelect === index">卡费优惠</view>
				<view style="padding-top: 34rpx;font-size: 24rpx;">30天（连续包月）</view>
				<view style="padding-top: 10rpx;font-size: 24rpx;">￥<text style="font-size: 50rpx;font-weight: 600;">9.90</text>
				</view>
				<view style="padding-top: 10rpx;font-size: 24rpx;text-decoration: line-through;">￥19.90</view>

				<view class="check-footer">开卡立享优惠特权</view>
			</view>
		</view>
		<view class="banner"></view>
		<view class="member-list">
			<view class="title">
				<view>每期<text style="color: #ef6041;">8</text>杯特价饮品</view>
				<view style="color: #0324a3;">自提外送通用</view>
			</view>
			<u-icon label-size="12" size="12" label="以下商品任选" name="question-circle"></u-icon>
			<view class="each-list">
				<view class="good-content" v-for="item in 8" :key="item">
					<view class="goods-image"></view>
					<text>生椰拿铁</text>
					<view style="color: #f2723a;"><text style="font-size: 16rpx;">￥</text>14.5</view>
				</view>
			</view>
		</view>
		
		<view class="banner"></view>
		<view class="member-footer">
			<u-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
				<u-radio @change="radioChange" :name="item.name" :disabled="item.disabled" label-size="12" icon-size="10"
					label="我已阅读并同意 ⟪付费会员服务协议⟫ ⟪自动续费说明⟫">
				</u-radio>
			</u-radio-group>

			<view style="margin-top: 30rpx;font-size: 30rpx;"><u-button style="color: #7d5a35;" color="linear-gradient(to right, #edd2a0,#d5a967)" shape="circle">立即购买￥9.90<text style="text-decoration: line-through;margin-left: 10rpx;font-size: 24rpx;">19.90</text></u-button></view>
		</view>
	</scroll-view>
</template>

<script>
	export default {
		data() {
			return {
				isSelect: 0,
			}
		}
	}
</script>

<style lang="scss" scoped>
	.member-container {
		background-color: #f5f5f5;
		height: 100vh;
		width: 100%;
		padding: 30rpx;
		padding-bottom: 200rpx;

		.banner {
			margin-top: 30rpx;
			background-color: #1f2774;
			height: 300rpx;
			border-radius: 10rpx;
			box-shadow: 5rpx 5rpx 5rpx #868cb4;
		}

		.check-member {
			padding-top: 50rpx;

			&>view {
				position: relative;
				margin-top: 30rpx;
				height: 250rpx;
				width: 45%;
				margin-right: 20rpx;
				border-radius: 15rpx;
				background-color: #ffffff;
				color: #666666;
				text-align: center;

				.discount {
					position: absolute;
					top: -4rpx;
					left: -4rpx;
					width: 30%;
					height: 40rpx;
					background-color: #f85831;
					border-top-left-radius: 15rpx;
					border-bottom-right-radius: 5rpx;
					text-align: center;
					line-height: 40rpx;
					color: #fff;
					font-size: 20rpx;
				}

				.check-footer {
					position: absolute;
					bottom: 0%;
					left: 0%;
					height: 50rpx;
					line-height: 50rpx;
					background-color: #edd7b3;
					text-align: center;
					width: 100%;
					font-size: 24rpx;
					color: #b58649;
					border-bottom-left-radius: 15rpx;
					border-bottom-right-radius: 15rpx;
				}
			}

			.active {
				background-color: #fcf5ea;
				border: 4rpx solid #e2b778;
				color: #754605;
			}
		}

		.member-list {
			margin-top: 30rpx;
			padding: 20rpx;
			background-color: #fff;
			border-radius: 10rpx;

			.title {
				display: flex;
				justify-content: space-between;
				align-items: center;
			}

			.each-list {
				padding-top: 30rpx;
				display: flex;
				flex-wrap: wrap;
				.good-content {
					width: 23%;
					margin-left: 10rpx;
					margin-top: 10rpx;
					text-align: center;
					.goods-image {
						height: 150rpx;
						background-color: #d6ab6a;
						border-radius: 50%;
					}
				}

			}
		}

		.member-footer {
			position: fixed;
			bottom: 0%;
			left: 0%;
			width: 100%;
			height: 200rpx;
			padding: 30rpx;
			background-color: #fff;
		}
	}
</style>